<?php include_once($_SERVER['DOCUMENT_ROOT']."/controller/common/common_setting_unit.php"); ?>




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <?php include_once("../controller/detail-add.php"); ?>
    <?php include_once('../../../modules/head.php'); ?>
    <link href="../asset/css/style.css"  rel="stylesheet" type="text/css"/>
</head>


<body>

<div id="topbar">
    <?php include ROOT_PATH_.'/controller/common/module/topbar.php'; ?>
</div>

<div id="container" class="<? echo $system_part ?>">

    <div id="maincontent">

        <div id="sidebar">
            <?php include '../../../modules/sidebar.php'; ?>
        </div>





        <div id="content">
            <?php $page_title='用户信息';?>
            <?php include ROOT_PATH_.'/controller/common/module/mod-page-title.php'; ?>









            <div class="detail-box member-edit-box layui-form">

                <div class="detail-boxes">
                    <ul class="detail-boxing">


                        <form id="edit-member-form" method="post" action="detail-add-function.php?sys_part=user&nowpageid=<?echo $nowpageid?>" enctype="multipart/form-data" class="layui-form">


                            <div class="layui-form-item">
                                <label class="layui-form-label">账号</label>
                                <div class="layui-input-block">
                                    <input type="text" name="ai_name" required  lay-verify="required"  class="layui-input" value="<? echo $employee['name']?>">
                                </div>
                            </div>



                            <div class="layui-form-item">
                                <label class="layui-form-label">密码</label>
                                <div class="layui-input-block">
                                    <input type="text" name="ai_admin_password" required  lay-verify="required"  class="layui-input" value="cir12345">
                                </div>
                            </div>




                            <?if($_SESSION['admin_term']=='1'){?>

                                <div class="layui-form-item">
                                    <label class="layui-form-label">权限</label>
                                    <div class="layui-input-block">
                                        <input type="radio" name="ai_admin_term" value="1" title="管理员" checked >
                                        <input type="radio" name="ai_admin_term" value="0" title="编辑" >

                                    </div>
                                </div>
                            <?}?>




                            <? if(in_array("admin",$quanxian)){?>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">系统权限</label>
                                    <div class="layui-input-block">

                                        <? $employee_quanxian=explode(",",$employee['quanxian']);?>

                                        <input type="checkbox" name="ai_quanxian[]" value="admin" title="管理员" <?if(in_array('admin',$employee_quanxian)){echo "checked";}?>>

                                        <?foreach ($plate as $k=>$v) {
                                            if($v['status']=='public'){?>
                                                <div>
                                                    <input type="checkbox" name="ai_quanxian[]" value="<?echo $k?>" title="<?echo $v['name']?>" <?if(in_array($k,$employee_quanxian)){echo "checked";}?>  >
                                                    ：
                                                    <?foreach ($v['permission'] as $k2=>$v2) {?>
                                                        <input type="checkbox" name="ai_quanxian[]" value="<?echo $v2?>" title="<?echo str_replace($v['name']."_","",$v2)?>" <?if(in_array($v2,$employee_quanxian)){echo "checked";}?>  >
                                                        <?;}?>

                                                </div>
                                            <?}?>
                                        <?}?>


                                    </div>
                                </div>
                            <?}?>

                            <li class="layui-form-item">
                                <label class="layui-form-label">账户简介</label>
                                <div class="layui-input-block">
                                    <textarea name="ai_introduce" class="layui-textarea" ><? echo $employee['introduce'] ?></textarea>
                                    <div class="notice">填写现正在登陆的账号描述</div>
                                </div>
                            </li>


                            <div class="layui-form-item">
                                <label class="layui-form-label">状态</label>
                                <div class="layui-input-block">
                                    <input type="radio" name="ai_status" value="正常" title="正常" checked >
                                    <input type="radio" name="ai_status" value="停用" title="停用" >

                                </div>
                            </div>



                            <input type="hidden" name="nid"        value="<? echo $employee['nid'] ?>">
                            <input type="hidden" name="sys_part"   value="<? echo $_REQUEST['sys_part'] ?>">
                            <input type="hidden" name="nowpageid"  value="<? echo $_REQUEST['nowpageid'] ?>"/>
                            <input type="hidden" name="sortby"     value="<? echo $_REQUEST['sortby'] ?>"/>


                            <div class="function">
                                <div class="layui-input-block">
                                    <button class="layui-btn" lay-submit lay-filter="formMemberAdd" type="submit">立即提交</button>
                                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                                </div>
                            </div>

                        </form>






                    </ul>
                </div>
            </div>

            <!--content端點01-->
        </div>
        <!--maincontent端點01-->
        <br class="clearfloat"/>
    </div>
    <!--container端點01-->
</div>


<!--删除box-->
<?php include '../../../modules/deletebar.php'; ?>
<!--删除box end-->
<?php include ROOT_PATH_ . "/controller/common/module/flashbox.php"; ?>
<script src="../assets/js/detail-list-update.js"></script>
<?php include ROOT_PATH_ . "/controller/common/module/footer.php"; ?>
</body>
</html>
